﻿#ifndef __SS_SHADER_MANAGER_H__
#define __SS_SHADER_MANAGER_H__
#include "container/ssMap.h"
#include "ssShader.h"
#include "ssSingleton.h"

namespace StarSeeker
{

class ssShaderManager
{
	SS_SINGLETON(ssShaderManager)
public:
	ssShaderManager();
	~ssShaderManager();
	//保存一个shader对象
	bool AddShader(ssShader* ps);
	//删除一个shader对象
	bool DeleteShader(const char* name);
	bool DeleteShader(ulint hash);
	//查找shader
	ssShader* Find(const char* name);
	ssShader* Find(ulint hash);
	//创建默认着色器
	void CreateDefaultShader();
private:
	//释放内存
	void Clear();
private:
	ssMap<ulint,ssShader*>	m_mapShader;
};

}
#endif
